<%@ page language="java" contentType="text/html; charset=UTF-8" trimDirectiveWhitespaces="true"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>


<dwz:paginationForm action="${contextPath}/online_gen/list" page="${page}" onsubmit="return navTabSearch(this)">
	<input type="hidden" name="name" value="${name}"/>
</dwz:paginationForm>
<form method="post" action="${contextPath }/online_gen/list" onsubmit="return navTabSearch(this)">
	<div class="pageHeader">
		<div class="searchBar">
			<ul class="searchContent">
				<li>
					<label>表名：</label>
					<input type="text" name="name" value="${name}"/>
				</li>
				<li><div class="button"><div class="buttonContent"><button type="submit">搜索</button></div></div></li>
			</ul>
			
		</div>
	</div>
</form>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="OnlineGen:gen">
			<li><a iconClass="cog"   target="ajaxTodo"  href="${contextPath}/online_gen/gen/{slt_uid}"><span>默认生成</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="OnlineGen:custom">
			<li><a iconClass="cog_add" target="dialog"  rel="" width="600" height="380" mask="true" href="${contextPath}/online_gen/custom/{slt_uid}"><span>自定义生成</span></a></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="table" layoutH="112" width="100%">
		<thead>
			<tr>
				<th>表名</th>
				<th>实体名(生成预览，可定制)</th>
				<th>实体实列名(生成预览，可定制)</th>
				<th>模块名(生成预览，可定制)</th>
				<th>主键</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${tables}">
			<tr target="slt_uid" rel="${item.tableName}">
				<td><b style="font-size:12px">${item.tableName}</b></td>
				<td>${item.entityName}</td>
				<td>${item.instanceName}</td>
				<td>${item.entityName}</td>
				<td><b style="font-size:14px">${item.pk.name}</b>(${item.pk.sqlType},自增)</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	
	<!-- 分页 -->
	<dwz:pagination page="${page}" />

	
</div>